<?php if (!isset($_SESSION)) session_start(); ?>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<title>Koreanet</title>

<!-- Nanum Webfont -->
<style>
* {
	font-family: 'NanumGothic' !important;
}
</style>
<script src="http://www.google.com/jsapi"></script>
<script>
 google.load( "webfont", "1" );
 google.setOnLoadCallback(function() {
  WebFont.load({ custom: {
   families: [ "NanumGothic" ],
   urls: [ "http://fontface.kr/NanumGothic/css" ]
  }});
 });
</script>

<!-- Bootstrap core CSS -->
<link href="./dist/css/bootstrap.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="./css/main.css" rel="stylesheet">

</head>

<body>
<?php include 'header.php';?>

	<div class="container container_bottom">
		<div class="row">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h1>공지사항</h1>
				</div>
				<div class="panel-body">
					<iframe id="embeded-content" width="100%"
						src="http://devdog.cafe24.com/gnuboard4/bbs/board.php?bo_table=notice"
						scrolling="NO" marginwidth="0" marginheight="0" frameborder="0"
						allowTransparency="true"></iframe>
					<script type="text/javascript"> 
					function resize_frame(id) {
						var frm = document.getElementById("embeded-content");
						function resize() {
							frm.style.height = "auto";	// set default height for Opera
							contentHeight = frm.contentWindow.document.documentElement.scrollHeight;
							frm.style.height = contentHeight + 23 + "px";	// 23px for IE7
						}
						if (frm.addEventListener) {
							frm.addEventListener('load', resize, false);
						} else {
							frm.attachEvent('onload', resize);
						}
					}
					resize_frame('embeded-content');
					</script>
				</div>
			</div>
		</div>
		<!-- row 1 board -->
		<div class="row">
			<?php
			if (0 < $login->getGrade () && $login->getGrade () < 3) {
				echo "<div class='panel panel-default'>
									<div class='panel-heading'>
										<h1>인력 관리</h1>
									</div>
									<div class='panel-body'>'인력 관리'는 일일 결산 및 월 결산을 통해 기사님의 운송료 정보를 조회 및 수정하는 기능을 제공합니다.</div>
									<div class='text-right button_padding'>
										<a class='btn btn-lg btn-default' href='./employee_management.php'
											role='button'>인력 조회 &raquo;</a>
									</div>
								</div>";
			}
			if ($login->getGrade () == 3) {
				echo "<div class='panel panel-default'>
								<div class='panel-heading'>
									<h1>운송료 조회</h1>
								</div>
								<div class='panel-body'>기사님들의 월 운송료 조회 기능을 제공합니다.</div>
								<div class='text-right button_padding'>
									<a class='btn btn-lg btn-default' href='./payslip.php' role='button'>운송료 조회
										&raquo;</a>
								</div>
							</div>";
			}
			if (0 < $login->getGrade () && $login->getGrade () < 3) {
				echo "<div class='panel panel-default'>
								<div class='panel-heading'>
									<h1>재고 관리</h1>
								</div>
								<div class='panel-body'>2nd 프로젝트~</div>
								<div class='text-right button_padding'>
								<a class='btn btn-lg btn-default' href='#' role='button'
									disabled='disabled'>재고 관리 &raquo;</a>
								</div>
							</div>
							<div class='panel panel-default'>
								<div class='panel-heading'>
									<h1>차량 관리</h1>
								</div>
								<div class='panel-body'>2nd 프로젝트~</div>
								<div class='text-right button_padding'>
									<a class='btn btn-lg btn-default' href='#' role='button'
										disabled='disabled'>차량 관리 &raquo;</a>
								</div>
							</div>";
			}
			if ($login->getGrade () == 4) {
				echo "<div class='panel panel-default'>
							<div class='panel-heading'>
								<h1>배차 요청</h1>
							</div>
							<div class='panel-body'>3rd 프로젝트~</div>
							<div class='text-right button_padding'>
								<a class='btn btn-lg btn-default' href='#' role='button'
								disabled='disabled'>배차 요청 &raquo;</a>
							</div>
						</div>";
			}
			if (0 < $login->getGrade () && $login->getGrade () < 3) {
				echo "<div class='panel panel-default'>
							<div class='panel-heading'>
								<h1>배차 업무</h1>
							</div>
							<div class='panel-body'>3rd 프로젝트~</div>
							<div class='text-right button_padding'>
								<a class='btn btn-lg btn-default' href='#' role='button'
								disabled='disabled'>배차 업무 &raquo;</a>
							</div>
						</div>";
			}
			?>
		</div>
		<!-- row 2 link botton -->
	</div>
	<!-- /container -->

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
	<script src="./dist/js/bootstrap.min.js"></script>
	<script>
	$(window).load(function () {
		window.parent.document.title = 'Koreanet';
	});
    </script>
</body>
</html>